import 'package:xin_he/generated/json/base/json_field.dart';
import 'package:xin_he/generated/json/xin_he_goods_item_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class XinHeGoodsItemEntity {
	String? dis;
	double? freightFee;
	int? goodsTypeId;
	int? goodsZoneType;
	int? goodsZoneTypeId;
	String? iconPath;
	int? id;
	String? name;
	double? originalPrice;
	double? price;
	String? remark;
	int? sellerUserId;
	String? sendAddress;
	String? unit;

	XinHeGoodsItemEntity();

	factory XinHeGoodsItemEntity.fromJson(Map<String, dynamic> json) => $XinHeGoodsItemEntityFromJson(json);

	Map<String, dynamic> toJson() => $XinHeGoodsItemEntityToJson(this);

	XinHeGoodsItemEntity copyWith({String? dis, double? freightFee, int? goodsTypeId, int? goodsZoneType, int? goodsZoneTypeId, String? iconPath, int? id, String? name, double? originalPrice, double? price, String? remark, int? sellerUserId, String? sendAddress, String? unit}) {
		return XinHeGoodsItemEntity()
			..dis= dis ?? this.dis
			..freightFee= freightFee ?? this.freightFee
			..goodsTypeId= goodsTypeId ?? this.goodsTypeId
			..goodsZoneType= goodsZoneType ?? this.goodsZoneType
			..goodsZoneTypeId= goodsZoneTypeId ?? this.goodsZoneTypeId
			..iconPath= iconPath ?? this.iconPath
			..id= id ?? this.id
			..name= name ?? this.name
			..originalPrice= originalPrice ?? this.originalPrice
			..price= price ?? this.price
			..remark= remark ?? this.remark
			..sellerUserId= sellerUserId ?? this.sellerUserId
			..sendAddress= sendAddress ?? this.sendAddress
			..unit= unit ?? this.unit;

	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}